package entity.device.dto;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import entity.device.Deviceprocure;
import entity.device.EquipmentArchives;

/**
 * @ClassName: DeviceprocureQueryWrapper
 * @Description: //TODO
 * @Author: 18438
 * @Date: 2023/6/4 19:48
 **/

public class DeviceprocureQueryWrapper {
    public QueryWrapper<Deviceprocure> conditional(Deviceprocure deviceprocure) {
        QueryWrapper<Deviceprocure> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("delete_flag", 0);
        if (deviceprocure.getDeCode()!=null){
            queryWrapper.like("de_code",deviceprocure.getDeCode());
        }
        if (deviceprocure.getDepartmentId()!=null){
            queryWrapper.eq("department_id",deviceprocure.getDepartmentId());
        }
        if (deviceprocure.getDePersonid()!=null){
            queryWrapper.eq("de_personid",deviceprocure.getDePersonid());
        }
        if (deviceprocure.getSupplierPerson()!=null){
            queryWrapper.eq("supplier_id",deviceprocure.getSupplierId());
        }
        if (deviceprocure.getDeTime()!=null){
            queryWrapper.like("de_time",deviceprocure.getDeTime());
        }
        return queryWrapper;
    }

}
